package com.xju.ikun.service.serviceImpl;

import com.xju.ikun.bean.MtypeBean;
import com.xju.ikun.bean.UserlistBean;
import com.xju.ikun.dao.UserlistDao;
import com.xju.ikun.service.UserlistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserlistServiceImpl implements UserlistService {
    @Autowired
    private UserlistDao userlistDao;

    @Override
    public List<UserlistBean> findByUserid(int userid) {
        return userlistDao.findByUserid(userid);
    }

    @Override
    public int insertUserlistBean(int userid, int listid) {
        UserlistBean userlistBean = new UserlistBean();
        userlistBean.setUserlist_userid(userid);
        userlistBean.setUserlist_listid(listid);
        return (userlistDao.insertUserlistBean(userlistBean));
    }


    @Override
    public UserlistBean findByUseridListid(int userid, int listid) {
        return userlistDao.findByUseridListid(userid,listid);
    }

}
